package com.softserveinc.autorent.controller;

import java.util.Collection;
import java.util.List;

import javax.ejb.EJB;
import javax.ejb.Stateless;
import com.softserveinc.autorent.model.User;

@Stateless
public class UserController 
{
	@EJB
	private UserManager userManager;
	
	
	public void create(User c)
	{
		userManager.create(c);
	}
	
	public User read(int id)
	{
		return userManager.read(id);
	}
	
	public void update(User c)
	{
		userManager.update(c);
	}
	
	public void delete(int id)
	{
		 userManager.delete(id);
	}
	
	public void delete(User c)
	{
		 userManager.delete(c);
	}
	
	public List<User> getAll()
	{
		Collection<User> c = userManager.getAll();
		
		return (List<User>)c;
	}
	    
}
